<?php include_once "controle/controle.php"; 
//echo "PAG: ".$_GET["emp"];
?>
<!DOCTYPE html>
<html>
    <head>
        <title>Agenda de Eventos</title>
        <meta charset="UTF-8">
        <meta name="robots" content="noindex, nofollow">
        
        <link href="css/estilo.css" rel="stylesheet" type="text/css" media="all">
        <link href="css/agenda.css" rel="stylesheet" type="text/css" media="all">
        
        <script type="text/javascript" src="js/javascript.js"></script>
        <script type="text/javascript" src="js/estado_cidade.js"></script>
        <script type="text/javascript" src="js/mootools-for-crop.js"></script>
        <script type="text/javascript" src="js/UvumiCrop-compressed.js"></script>
        
        <script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyABqKGB_A0x42SdpxJNrGR5bPtj72Qc_Vo&sensor=false"></script>
        <script type="text/javascript" src="js/localizacao.js"></script>
        
    </head>
    <body>
        <header>
            <div id="header">
                <a href="<?=url("")?>"><h1>Agenda</h1></a>
                <div id="acesso">
                    <?php if(logado()){ ?>
                    <div id='logado'><a href="<?=url("emp=".$_SESSION["agenda_identificacao"])?>" title="Seu perfil">Olá <?=$_SESSION["agenda_nome"]?></a> | <a href='<?=url("sair=1")?>' title='Sair do sistema'>Sair</a></div>
                    <?php }else{ ?>
                    <a href="<?=url("pag=acessar")?>" title="Acesse sua conta"><button>Acessar</button></a>
                    <a href="<?=url("pag=cademp")?>" title="Cadastre sua empresa"><button>Cadastrar</button></a>
                    <?php } ?>
                </div>
            </div>
        </header>
        <section>
            <?php
            switch ($pag){
                case "acessar": include_once "visao/login.php"; break;
                case "cademp": include_once "visao/cadastro.php"; break;
                case "eper": include_once "visao/perfil.php"; break;
                case "alts": include_once "visao/altSenha.php"; break;
                case "altl": include_once "visao/altLogo.php"; break;
                case "cadeve": include_once "visao/cad_evento.php"; break;
                case "eve": include_once "visao/evento.php"; break;
                
                default: 
                    if($_GET["emp"] != ''){
                        include_once "visao/perfil.php";
                    }else{
                        include_once "visao/home.php";
                    }
            }
            ?>
        </section>
        <footer>
            <div id="footer">
                
            </div>
        </footer>
    </body>
</html>